<?php
/**
 * Created by JetBrains PhpStorm.
 * User: shaoshuai
 * Date: 12-7-14
 * Time: 下午9:59
 * To change this template use File | Settings | File Templates.
 */
class Airplane
{
    /**
     * @var array
     */
    protected $matrix;

    /**
     * @var array
     */
    protected $crashCoordinate;

    /**
     * @static
     * @param string $id airplane type id
     * @return Airplane
     */
    public static function factory($id)
    {
        $map = array('f15' => 'F15');
        $className = $map[$id];
        return new $className;
    }

    /**
     * @return array
     */
    public function getMatrix()
    {
        return $this->matrix;
    }

    /**
     * @return array
     */
    public function getCrashCoordinate()
    {
        return $this->crashCoordinate;
    }
}
